package com.zmj.mapstruct;

import lombok.Data;

import java.time.LocalDateTime;
import java.time.format.DateTimeFormatter;

/**
 * @author zmj
 */
@Data
public class DateTransform {

    /**
     * 类型转换
     *
     * @param localDateTime
     * @return
     */
    public static String dateToStr(LocalDateTime localDateTime) {
        return DateTimeFormatter.ofPattern("yyyy-MM-dd HH:mm:ss").format(localDateTime);
    }
}
